package com.lvmama.comm.pet.po.pub;

import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.<p/>
 * User: troy-kou<p/>
 * Date: 14-1-7<p/>
 * Time: 下午4:10<p/>
 * Email:kouhongyu@163.com<p/>
 */
public class TaskResult implements Serializable {

    private static final long serialVersionUID = -9125140179290984246L;

    /**
     * 远程任务返回状态(新)
     */
    private RUN_STATUS runStatus;
    /**
     * 远程任务返回结果
     */
    private String result;

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public RUN_STATUS getRunStatus() {
        return runStatus;
    }

    public void setRunStatus(RUN_STATUS runStatus) {
        this.runStatus = runStatus;
    }




    public enum RUN_STATUS {

        RUNNING("运行中"),
        SUCCESS("成功"),
        PARTIAL_SUCCESS("部分成功"),
        FAILED("失败");

        private String cnName;

        RUN_STATUS(String name) {
            this.cnName = name;
        }

        public String getCode() {
            return this.name();
        }

        public String getCnName() {
            return this.cnName;
        }

        public String toString() {
            return this.name();
        }
    }


    @Override
    public String toString() {
        return "TaskResult{" +
                "runStatus=" + runStatus +
                ", result='" + result + '\'' +
                '}';
    }
}
